Fixing SDMA TO after GPU reset
Subsystems (2)
Attached patch fixes SDMA TO after GPU reset, it's a regression caused by cbd5285 drm/amdgpu: move setting the GART addr into TTM.
But to me it looks safer just to revert the original patch all together since we never can predict for sure if VM flush will take place and so it's safer to just always assign job->vm_pd_addr.
Andrey
Quoted 1 line
From
038ca047fc41d85fb390b9564cebc7c6da441831Mon Sep 17 00:00:00 2001
From: Andrey Grodzovsky <[email protected]>
Date: Mon, 10 Sep 2018 18:43:58 -0400
Subject: drm/amdgpu: Fix SDMA TO after GPU reset
After GPU reset amdgpu_vm_clear_bo triggers VM flush but job->vm_pd_addr is not set causing SDMA TO.
Fixes cbd5285 drm/amdgpu: move setting the GART addr into TTM.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2 -0
@@ -526,6 +526,8 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,if (r) goto error; + job->vm_pd_addr =amdgpu_gmc_pd_addr (adev->gart.bo); + addr =amdgpu_bo_gpu_offset (bo);if (ats_entries) {uint64_t ats_value;
Signature · 1 line
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 059118f3-2729-12a1-7c8d-e306f69369aa-5C7GfCeVMHo@public.gmane.org
It would probably be better to initialize job->vm_pd_addr with AMDGPU_BO_INVALID_OFFSET.
And then just drop the vm flush alltogether when the vm_pd_addr isn't set to something sane.
Thanks,
Christian.
Am 11.09.2018 um 00:52 schrieb Andrey Grodzovsky:
Quoted 4 lines
Attached patch fixes SDMA TO after GPU reset, it's a regression caused by cbd5285 drm/amdgpu: move setting the GART addr into TTM.
But to me it looks safer just to revert the original patch all together since we never can predict for sure if VM flush will take place and so it's safer to just always assign
job->vm_pd_addr.
Quoted 8 lines
Andrey
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): aa21f524-ac5e-ddb7-448a-d12ec1599a59-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
By current code logic job->vm_pd_addr is never going to be set unless the job is created for user SC or for buffer copy in amdgpu_copy_buffer So in any other case we are going to skip VM flush. But amdgpu_vm_flush wants a flush to happen in case GPU reset just happend (amdgpu_vmid_had_gpu_reset is true) so we will be skipping that VM flush (as in my case with amdgpu_driver_open_kms->amdgpu_vm_init->amdgpu_vm_clear_bo right after GPU reset occured) Is it safe ?
Andrey
Quoted 21 lines · Christian König
It would probably be better to initialize
job->vm_pd_addrwithAMDGPU_BO_INVALID_OFFSET.And then just drop the vm flush alltogether when the
vm_pd_addrisn't set to something sane.Thanks,
Christian.Am 11.09.2018 um 00:52 schrieb Andrey Grodzovsky:
Quoted 12 lines
Attached patch fixes SDMA TO after GPU reset, it's a regression caused by cbd5285 drm/amdgpu: move setting the GART addr into TTM.
But to me it looks safer just to revert the original patch all together since we never can predict for sure if VM flush will take place and so it's safer to just always assign
job->vm_pd_addr.Andrey
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): e73cb83b-750c-fd4f-40c9-635cd04bd979-5C7GfCeVMHo@public.gmane.org
Yes, that is actually desired.
We should not flush the system VM just because we do some clearing command submission.
Christian.
Am 11.09.2018 15:54 schrieb "Grodzovsky, Andrey" <[email protected]>:
By current code logic job->vm_pd_addr is never going to be set unless the job is created for user SC or for buffer copy in amdgpu_copy_buffer So in any other case we are going to skip VM flush. But amdgpu_vm_flush wants a flush to happen in case GPU reset just happend (amdgpu_vmid_had_gpu_reset is true) so we will be skipping that VM flush (as in my case with amdgpu_driver_open_kms->amdgpu_vm_init->amdgpu_vm_clear_bo right after GPU reset occured) Is it safe ?
Andrey
On 09/11/2018 07:46 AM, Christian König wrote:
It would probably be better to initialize job->vm_pd_addr with AMDGPU_BO_INVALID_OFFSET.
And then just drop the vm flush alltogether when the vm_pd_addr isn't set to something sane.
Thanks,
Christian.
Am 11.09.2018 um 00:52 schrieb Andrey Grodzovsky:
Attached patch fixes SDMA TO after GPU reset, it's a regression caused by cbd5285 drm/amdgpu: move setting the GART addr into TTM.
But to me it looks safer just to revert the original patch all together since we never can predict for sure if VM flush will take place and so it's safer to just always assign job->vm_pd_addr.
Andrey
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx